﻿using LuShanTea.Service.Entities;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace LuShanTea.Service.ModelConfig
{
   public class CollectConfig:EntityTypeConfiguration<Collect>
    {
        public CollectConfig()
        {
            this.ToTable("T_Collects");
            this.HasRequired(e => e.User).WithMany().HasForeignKey(e=>e.UserId).WillCascadeOnDelete(false);
            this.HasRequired(e => e.Good).WithMany().HasForeignKey(e=>e.GoodId).WillCascadeOnDelete(false);
        }
    }
}
